
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="height=device-height,width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no;" charset="UTF-8"/>
    <link rel="stylesheet" href="css/mensa.css" type="text/css" media="screen">
    <title>Aktueller Speiseplan Mensa 1</title>
</head>

<body>
    <div id="header">
        <img src="siegel_rot.jpg">
    </div>
    <div id="main">
    <?php 
$host = "http://www.stw-on.de/braunschweig/essen/menus/mensa-1"; 
$filestring = file_get_contents($host); 
$startpos = 0; 
while($pos = strpos($filestring, "<table", $startpos)) 
{ 
    $string = substr($filestring, $pos, strpos($filestring, "</table>", $pos + 1) - $pos); 
    // Wenn 'id="thread_title_' in $string ist, gib den Link aus 
    //if(stristr($string, 'id="thread_title_')) { 
    //    echo $string."</br>"; 
    //} 
    if (stristr($string, "Montag")) {
        echo $string."MO</br>";
    } 
    if (stristr($string, "Dienstag")) {
        echo $string."DI</br>";
    } 
    if (stristr($string, "Mittwoch")) {
        echo $string."MI</br>";
    } 
    if (stristr($string, "Donnerstag")) {
        echo $string."DO</br>";
    } 
    if (stristr($string, "Freitag")) {
        echo $string."FR</br>";
    } 
    if (stristr($string, "Samstag")) {
        echo $string."SA</br>";
    }
    //echo $string."</br>";
    $startpos = $pos + 1; 
} 
?>
    </div>
</body>
</html>